package com.ustc.hewei.seckillmodule.serviceImpl;

import com.ustc.hewei.commonmodule.dto.Result;
import com.ustc.hewei.commonmodule.entity.Voucher;
import com.ustc.hewei.commonmodule.mapper.VoucherMapper;
import com.ustc.hewei.commonmodule.service.IVoucherService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ustc.hewei.nettyrpc2_0.common.annotation.RPCService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author hewei
 * @since 2022-10-05
 */
@Service
@RPCService(value = IVoucherService.class)
public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, Voucher> implements IVoucherService {

    @Override
    public Result queryVoucherByShopId(Long shopId) {
        List<Voucher> voucherList = baseMapper.queryVoucherByShopId(shopId);
        return Result.ok(voucherList);
    }
}
